<script language="javascript" type="text/javascript" src="/assets/My97DatePicker/jquery-1.8.2.js"></script>
<script language="javascript" type="text/javascript" src="/assets/libs/fastadmin-layer/dist/layer.js"></script>
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="" enctype="multipart/form-data">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">标题:</label>
        <div class="col-xs-12 col-sm-8" style="width:410px;">
           <span>{$res.title}</span>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">问题描述:</label>
        <div class="col-xs-12 col-sm-8" >
            <span>{$res.info}</span>
        </div>
    </div>
    {if condition="$flag eq 1"}
        {volist name="res1" id="vo"}
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">已回答:</label>
                <div class="col-xs-12 col-sm-8" >
                    <span>{$vo.info}</span>
                </div>
            </div>
        {/volist}
    {/if}
    <input type="hidden" name="id" value="{$res.id}"/>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">回答问题:</label>
        <div class="col-xs-12 col-sm-8" >
            <textarea id="info" name="info" style="width:400px; height:200px;"></textarea>
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="button" class="btn btn-success btn-embossed" onclick="sub();">添加</button>
            <a  href="/admin/user_article/index" class="btn btn-default btn-embossed">返回</a>
        </div>
    </div>
</form>

<script language="JavaScript">

    function sub() {
        var info=$("#info").val();
        if(info==''){
            layer.alert("回复信息不得为空");
            return;
        }
        $("#add-form").submit();


    }

</script>



